package com.addzero.web.modules.demo2

import com.addzero.dsl.Dsl

@Dsl(genCollectionDslBuilder = true)
data class Http(val url: String, val method: String) {
    @Dsl
    data class Body(val bb: String) {
        @Dsl
        data class Json(val someJson: String) {}
    }

    @Dsl
    data class Header(val token: String) {}
}

fun main() {
    val http1 = http {
        url = "https://api.example.com"
        method = "djasoi"
        body {
            json {
                bb = "bb"
                someJson = "someJson"
            }
        }
        header {
            token = "djaosidj"
        }
    }
    val http = http1
    val http2 = http1
    val http3 = http1
    val https = https {
        val http = http1
        val http2 = http1
        val http3 = http1
    }
    println(https)

}

